package com.cloudkinto.service.orderinput;

import com.cloudkinto.entity.OrderInputDo;
import com.baomidou.mybatisplus.extension.service.IService;

import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.service.headercontainer.vo.HeaderFeeSetRequest;
import com.cloudkinto.service.orderinput.vo.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  service接口
 * </p>
 * @author 张永远
 * @since 2020-06-08
 */
public interface OrderInputService extends IService<OrderInputDo> {

    SingleResult addInit(Long userId, Long companyId);

    SingleResult addInitByStorageId(Long id);

    OrderInputAddReq add(OrderInputAddReq req, Long userId,Long companyId);

    SingleResult markIn(InputOrderMarkSingleReq req, Long userId);

    SingleResult markInInit(Long id);

    //分配仓库
    void allocationStorage(OperateReq req,Long userId);

    SingleResult markInSingleInit(String packageId);

    SingleResult storageList();

    SingleResult markInSingle(InputOrderMarkReq req, Long userId);

    SingleResult<Map> updateInit(Long id, Long currentUserId, Long companyId);

    OrderInputUpdateReq update(OrderInputUpdateReq updateVo, Long userId);

    int delete(Long id, Long userId);

    OderInputDetailRes detail(Long id);

    SingleResult auditInit();

    SingleResult auditStatusInit();

    SingleResult setUpCost(SetUpCostReq req,Long userId);

    SingleResult audit(AuditReq req,Long userId);

    SingleResult pageInit(Long userId, Long companyId);

    PageResult getListPage(Map<String, String> map);

    List<ExcelImportPackageRes> importExcel(MultipartFile file, Long companyId) throws IOException;

    void exportPackagePdf(Long id, HttpServletResponse response);

    SingleResult exportProductCodePdf(Long id, HttpServletResponse response);

    SingleResult fbaReturnInit(Long id,Long userId);

    SingleResult rollBack(Long id,Long userId,long oldStatus);

    SingleResult setPriceInit(long type, long orderId);

    SingleResult setPriceItem(HeaderFeeSetRequest request);

    void exportHeaderFeePage(Long orderId, HttpServletResponse response);

    void exportPackageInvoice(Long id, HttpServletResponse responseBody);

    void printBarCodePdf(Map<String, String> map, Long id, int length, int width, HttpServletResponse response);

    double getOrderInputUnitCost(Long orderId, Long companyId);


}
